<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    
    <title>SpringBoot 中使用Redis Stream 实现消息监听 | Huhailong</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    

    
        <meta property="algolia:search" data-application-id="Z2O8U9ACCM" data-api-key="e2ecf104500495239b45a6d38163c2e8" data-index-name="huhailong">
    

    

    

    
        <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>😃</text></svg>">
    

    
    <link rel="stylesheet" href="https://unpkg.com/gitalk/dist/gitalk.css">
    

    

    
<link rel="stylesheet" href="/dist/build.css?v=1630473019367.css">

    <script src="https://use.fontawesome.com/0807d6e1ca.js"></script>
    <script>
        window.isPost = true
        window.aomori = {
            
            gitalk: {
                enable: true,
                clientID: "de841f92787224d0163e",
                clientSecret: "2b8243d84acb67269b200a14fa12ed5d5a33c5b4",
                repo: "blog-message",
                owner: "huhailonggit",
                admin: ["huhailonggit",],
                distractionFreeMode: true  // Facebook-like distraction free mode
            },
            
            
            
        }
        window.aomori_logo_typed_animated = true
        window.aomori_search_algolia = true

    </script>

<meta name="generator" content="Hexo 5.4.0"></head>

<body>

    <div class="container">
    <header class="header">
        <div class="header-type">
            
            <div class="header-type-avatar avatar avatar-sm">
                <img src="/images/avatar.jpg" alt="胡海龙">
            </div>
            
            <div class="header-type-inner">
                
                    <div id="typed-strings" style="display:none">
                        <p>Huhailong</p>
                    </div>
                    <a class="header-type-title" id="typed" href="/"></a>
                
    
                
            </div>
        </div>
        <div class="header-menu">
            <div class="header-menu-inner">
                
                <a href="/">Home</a>
                
                <a href="/archives">Archives</a>
                
                <a href="/friends">Links</a>
                
                <a href="/photography">Photography</a>
                
            </div>
            <div class="header-menu-social">
                
    <a class="social" target="_blank" href="https://gitee.com/hlovez">
        <box-icon type='' name='code-alt'></box-icon>
    </a>

    <a class="social" target="_blank" href="https://www.huhailong.vip">
        <box-icon type='' name='home'></box-icon>
    </a>

            </div>
        </div>

        <div class="header-menu-mobile">
            <div class="header-menu-mobile-inner" id="mobile-menu-open">
                <i class="icon icon-menu"></i>
            </div>
        </div>
    </header>

    <div class="header-menu-mobile-menu">
        <div class="header-menu-mobile-menu-bg"></div>
        <div class="header-menu-mobile-menu-wrap">
            <div class="header-menu-mobile-menu-inner">
                <div class="header-menu-mobile-menu-close" id="mobile-menu-close">
                    <i class="icon icon-cross"></i>
                </div>
                <div class="header-menu-mobile-menu-list">
                    
                    <a href="/">Home</a>
                    
                    <a href="/archives">Archives</a>
                    
                    <a href="/friends">Links</a>
                    
                    <a href="/photography">Photography</a>
                    
                </div>
            </div>
        </div>
    </div>

</div>

    <div class="container">
        <div class="main">
            <section class="inner">
                <section class="inner-main">
                    <div class="post">
    <article id="post-cktr84hjd000108uk64dcgv7u" class="article article-type-post" itemscope
    itemprop="blogPost">

    <div class="article-inner">

        
          
        
        
        

        
        <header class="article-header">
            
  
    <h1 class="article-title" itemprop="name">
      SpringBoot 中使用Redis Stream 实现消息监听
    </h1>
  

        </header>
        

        <div class="article-more-info article-more-info-post hairline">

            <div class="article-date">
  <time datetime="2021-09-18T14:06:20.658Z" itemprop="datePublished">2021-09-18</time>
</div>

            

            
            <div class="article-tag">
                <ul class="article-tag-list" itemprop="keywords"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/springboot/" rel="tag">springboot</a></li></ul>
            </div>
            
        </div>

        <div class="article-entry post-inner-html hairline" itemprop="articleBody">
            <h3 id="SpringBoot-中使用Redis-Stream-实现消息监听"><a href="#SpringBoot-中使用Redis-Stream-实现消息监听" class="headerlink" title="SpringBoot 中使用Redis Stream 实现消息监听"></a>SpringBoot 中使用Redis Stream 实现消息监听</h3><h4 id="Demo环境"><a href="#Demo环境" class="headerlink" title="Demo环境"></a>Demo环境</h4><ul>
<li><strong>JDK8</strong></li>
<li><strong>Maven3.6.3</strong></li>
<li><strong>springboot2.4.3</strong></li>
</ul>
<span id="more"></span>

<h4 id="POM依赖"><a href="#POM依赖" class="headerlink" title="POM依赖"></a>POM依赖</h4><pre><code class="xml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
    xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;parent&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
        &lt;version&gt;2.4.3&lt;/version&gt;
        &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
    &lt;/parent&gt;
    &lt;groupId&gt;vip.huhailong&lt;/groupId&gt;
    &lt;artifactId&gt;redismq&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;redismq&lt;/name&gt;
    &lt;description&gt;base redis stream mq&lt;/description&gt;
    &lt;properties&gt;
        &lt;java.version&gt;1.8&lt;/java.version&gt;
    &lt;/properties&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
            &lt;artifactId&gt;lombok&lt;/artifactId&gt;
        &lt;/dependency&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-data-redis&lt;/artifactId&gt;
        &lt;/dependency&gt;

        &lt;dependency&gt;
            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
            &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
            &lt;scope&gt;test&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;

    &lt;build&gt;
        &lt;plugins&gt;
            &lt;plugin&gt;
                &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
            &lt;/plugin&gt;
        &lt;/plugins&gt;
    &lt;/build&gt;

&lt;/project&gt;
</code></pre>
<p>这里是一个简单的Demo，所以关于redis的一些序列化配置就省略了。</p>
<h4 id="配置监听消息类"><a href="#配置监听消息类" class="headerlink" title="配置监听消息类"></a>配置监听消息类</h4><p>配置监听消息类，这里类需要实现StreamListener接口，该接口下只有一个要实现的方法——onMessage方法，代码：</p>
<pre><code class="java">package vip.huhailong.redismq.redistool;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.stream.MapRecord;
import org.springframework.data.redis.stream.StreamListener;
import org.springframework.stereotype.Component;

/**
 * @author Huhailong
 * @Description 监听消息
 * @Date 2021/3/10.
 */
@Slf4j
@Component
public class ListenerMessage implements StreamListener&lt;String, MapRecord&lt;String, String, String&gt;&gt; &#123;

    @Override
    public void onMessage(MapRecord&lt;String, String, String&gt; entries) &#123;
        log.info(&quot;接受到来自redis的消息&quot;);
        System.out.println(&quot;message id &quot;+entries.getId());
        System.out.println(&quot;stream &quot;+entries.getStream());
        System.out.println(&quot;body &quot;+entries.getValue());
    &#125;
    
&#125;
</code></pre>
<p>配置完该类后我们再创建一个类将该监听器注入进去，代码：</p>
<pre><code class="java">package vip.huhailong.redismq.config;

import lombok.var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.connection.stream.Consumer;
import org.springframework.data.redis.connection.stream.ReadOffset;
import org.springframework.data.redis.connection.stream.StreamOffset;
import org.springframework.data.redis.stream.StreamMessageListenerContainer;
import org.springframework.data.redis.stream.Subscription;
import vip.huhailong.redismq.redistool.ListenerMessage;

import java.time.Duration;

/**
 * @author Huhailong
 * @Description
 * @Date 2021/3/12.
 */
@Configuration
public class RedisStreamConfig &#123;

    @Autowired
    private ListenerMessage streamListener;

    @Bean
    public Subscription subscription(RedisConnectionFactory factory)&#123;
        var options = StreamMessageListenerContainer
                .StreamMessageListenerContainerOptions
                .builder()
                .pollTimeout(Duration.ofSeconds(1))
                .build();
        var listenerContainer = StreamMessageListenerContainer.create(factory,options);
        var subscription = listenerContainer.receiveAutoAck(Consumer.from(&quot;mygroup&quot;,&quot;huhailong&quot;),
                StreamOffset.create(&quot;mystream&quot;, ReadOffset.lastConsumed()),streamListener);
        listenerContainer.start();
        return subscription;
    &#125;
&#125;
</code></pre>
<p><strong>代码分析：</strong></p>
<ol>
<li><p>首先将我们实现了StreamListener的监听器类注入。</p>
</li>
<li><p>subscription方法返回的是一个Subscription类型，它是与当前正在运行任务的链接，可以理解为订阅的链接，它有俩个方法</p>
<ol>
<li>boolean await(Duration timeout): 当订阅变为活动或超时时，同步阻塞呼叫将返回</li>
<li>boolean isActive(): 如果当前正在订阅则为true</li>
</ol>
</li>
<li><p>代码中的var是使用了Lombok的可变局部变量。主要是为了方便</p>
</li>
<li><p><strong>StreamMessageListenerContainer:</strong> 消息侦听容器，不能在外部实现。创建后，StreamMessageListenerContainer可以订阅Redis流并使用传入的消息。 StreamMessageListenerContainer允许多个流读取请求，并为每个读取请求返回一个Subscription句柄。取消订阅最终将终止后台轮询。使用键和值序列化器转换消息以支持各种序列化策略。<a target="_blank" rel="noopener" href="https://docs.spring.io/spring-data/redis/docs/2.4.5/api/">具体文档</a> </p>
</li>
<li><p>__StreamMessageListenerContainerOptions: __ 它是上面4的选项，代码中pollTimeout表示轮询超时时间</p>
</li>
<li><p>create方法使用给定的RedisConnectionFactory和上面的配置选项创建侦听器。</p>
</li>
<li><p>接下来使用receiveAutoAck创建一个新订阅，注意这里接受到消息后会被自动的确认，如果不想自动确认请使用其他的创建订阅方式。该方法共有三个参数</p>
<ol>
<li>消费组 consumer group ，它不能为null （Consumer类型）</li>
<li>stream offset ，stream的偏移量（StreamOffset<K> 类型）</li>
<li>listener 不能为null （StreamListener&lt;K,V&gt; 类型）</li>
</ol>
<p>代码中表示消费者来自名称为mygroup的组，消费者名称为huhailong，这里偏移量设置为了lastConsumed，它表示读取ID大于消费者组使用的最后一个元素的所有新到达的元素。</p>
</li>
</ol>
<p>现在就可以运行项目来验证了，将项目运行起来后通过终端给对应key的stream添加一条消息</p>
<pre><code class="bash">&gt; XADD mystream * message springboot
</code></pre>
<p>这时可以看到spring boot的控制台打印除了一下消息：</p>
<pre><code>message id 1615532778588-0
stream mystream
body &#123;message=springboot&#125;
</code></pre>
<p>说明侦听成功，它会一直处于监听状态，只要对应key的stream添加了新的消息都会被侦听到，到此也就简单的实现了消息队列功能。</p>
<h4 id="监听俩个stream的实现"><a href="#监听俩个stream的实现" class="headerlink" title="监听俩个stream的实现"></a>监听俩个stream的实现</h4><p>有网友想实现俩个或俩个以上的stream监听，可以这样实现（有其他更好的方法请留言评论，谢谢）<br>在上面监听一个stream的基础上在RedisStreamConfig类里增加监听方法，如下：</p>
<pre><code class="java">@Configuration
public class RedisStreamConfig &#123;

    @Autowired
    private ListenerMessage streamListener;

    @Bean
    public Subscription subscription(RedisConnectionFactory factory)&#123;
        var options = StreamMessageListenerContainer
                .StreamMessageListenerContainerOptions
                .builder()
                .pollTimeout(Duration.ofSeconds(1))
                .build();

        var listenerContainer = StreamMessageListenerContainer.create(factory,options);
        var subscription = listenerContainer.receiveAutoAck(Consumer.from(&quot;mygroup&quot;,&quot;huhailong&quot;),
                StreamOffset.create(&quot;mystream&quot;, ReadOffset.lastConsumed()),streamListener);
        listenerContainer.start();
        return subscription;
    &#125;

    @Bean
    public Subscription subscription2(RedisConnectionFactory factory)&#123;
        var options = StreamMessageListenerContainer
                .StreamMessageListenerContainerOptions
                .builder()
                .pollTimeout(Duration.ofSeconds(1))
                .build();

        var listenerContainer = StreamMessageListenerContainer.create(factory,options);
        var subscription = listenerContainer.receiveAutoAck(Consumer.from(&quot;mygroup&quot;,&quot;huhailong&quot;),
                StreamOffset.create(&quot;mystream2&quot;, ReadOffset.lastConsumed()),streamListener);
        listenerContainer.start();
        return subscription;
    &#125;
&#125;
</code></pre>
<p>记得创建该stream和对应的组，让后启动程序，在控制台模拟添加数据，如图：<br><img src="https://img-blog.csdnimg.cn/334e26e88dea43fab3fb2998408afb4c.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2hobDE4NzMwMjUyODIw,size_16,color_FFFFFF,t_70#pic_center" alt="模拟添加数据"><br>然后idea控制台的打印可以看到分别接收到了来自不同的stream的消息<br><img src="https://img-blog.csdnimg.cn/ac77f56db2c44facb1bef772e6a02c36.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2hobDE4NzMwMjUyODIw,size_16,color_FFFFFF,t_70#pic_center" alt="运行结果"><br>其他类和配置与监听一个的时候相同，不需要改变，有疑问的小伙伴可以留言评论，如果有帮助到你，记得点个赞（嘻嘻）</p>

        </div>

    </div>

    

    

    

    
<div class="article-copyright hairline">
  <p>
    本作品采用 <a rel="license noopener" target="_blank" href="http://creativecommons.org/licenses/by-nc-nd/4.0/">知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议</a> 进行许可。
  </p>
</div>


    

    
<nav class="article-nav">
  
    <a href="/2021/09/19/shiro%E7%BB%93%E5%90%88jwt%E5%AE%9E%E7%8E%B0%E7%99%BB%E5%BD%95%E6%B3%A8%E5%86%8C%E6%BF%80%E6%B4%BBdemo/" id="article-nav-newer" class="article-nav-link-wrap">
      <div class="article-nav-caption">下一篇</div>
      <div class="article-nav-title">
        
          登录认证项目shirobyjwt
        
      </div>
    </a>
  
  
    <a href="/2021/09/18/%E5%85%B3%E4%BA%8E%E6%9C%AC%E7%AB%99/" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-caption">上一篇</div>
      <div class="article-nav-title">🚍🚍🚍🚍🚍🚍</div>
    </a>
  
</nav>


    <section class="share">
        <div class="share-title">分享</div>
        <!--<a class="share-item" target="_blank"
            href="https://twitter.com/share?text=SpringBoot 中使用Redis Stream 实现消息监听 - Huhailong&url=https://hlovez.gitee.io/2021/09/18/SpringBoot%20%E4%B8%AD%E4%BD%BF%E7%94%A8Redis%20Stream%20%E5%AE%9E%E7%8E%B0%E6%B6%88%E6%81%AF%E7%9B%91%E5%90%AC/">
            <box-icon type='logo' name='twitter'></box-icon>
        </a>-->
        <a class="share-item" target="_blank"
            href="https://www.douban.com/share/service?name=SpringBoot 中使用Redis Stream 实现消息监听 - Huhailong&url=https://hlovez.gitee.io/2021/09/18/SpringBoot%20%E4%B8%AD%E4%BD%BF%E7%94%A8Redis%20Stream%20%E5%AE%9E%E7%8E%B0%E6%B6%88%E6%81%AF%E7%9B%91%E5%90%AC/">
            <div class='fa fa-link' type='logo' ></div>
        </a>
        <a class="share-item" target="_blank"
            href="https://service.weibo.com/share/share.php?title=SpringBoot 中使用Redis Stream 实现消息监听 - Huhailong&url=https://hlovez.gitee.io/2021/09/18/SpringBoot%20%E4%B8%AD%E4%BD%BF%E7%94%A8Redis%20Stream%20%E5%AE%9E%E7%8E%B0%E6%B6%88%E6%81%AF%E7%9B%91%E5%90%AC/&pic=">
            <div class="fa fa-weibo"></i></div>
        </a>
    </section>

</article>






<section class="comments">
    <div id="gitalk-container"></div>
</section>





</div>
                </section>
            </section>

            
            <aside class="sidebar sidebar-search-fix">
                

    <div class="search">
    <div class="has-icon-right">
        <input type="text" class="form-input" id="search" placeholder="SEARCH" autocomplete="off">
        <div class="form-icon">
            <box-icon name='search' color="#3c4859"></box-icon>
        </div>
    </div>
    <div class="search-result" id="search-ps"></div>
</div>


<div class="widget" id="widget">
    
      
  <div class="widget-wrap">
    <div class="widget-inner">
      <div class="toc post-toc-html"></div>
    </div>
  </div>

    
      

    
      
  <div class="widget-wrap widget-tags">
    <div class="widget-title"><span>Tags</span></div>
    <div class="widget-inner">
      <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java-NIO/" rel="tag">Java NIO</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java-NIO/" rel="tag">java NIO</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/" rel="tag">redis</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/shiro/" rel="tag">shiro</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/springboot/" rel="tag">springboot</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%AE%89%E5%85%A8/" rel="tag">安全</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%B6%88%E6%81%AF/" rel="tag">消息</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%AC%94%E8%AE%B0/" rel="tag">笔记</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E9%9A%8F%E7%AC%94/" rel="tag">随笔</a></li></ul>
    </div>
  </div>


    
      
  <div class="widget-wrap widget-recent-posts">
    <div class="widget-title"><span>Recent Posts</span></div>
    <div class="widget-inner">
      <ul>
        
          <li>
            <a href="/2021/10/30/Java%20NIO-5/">Java NIO 笔记05</a>
          </li>
        
          <li>
            <a href="/2021/10/25/Java%20NIO-4/">Java NIO 笔记04</a>
          </li>
        
          <li>
            <a href="/2021/10/17/Java%20NIO-3/">Java NIO 笔记03</a>
          </li>
        
          <li>
            <a href="/2021/10/12/%E6%88%91%E7%9A%84%E6%9C%8D%E5%8A%A1%E5%99%A8%E6%8F%90%E9%80%9F%E5%95%A6/">我的服务器提速啦！</a>
          </li>
        
          <li>
            <a href="/2021/10/10/Java%20NIO2/">Java NIO 笔记02</a>
          </li>
        
      </ul>
    </div>
  </div>

    
      
  <div class="widget-wrap widget-archive">
    <div class="widget-title"><span>Archive</span></div>
    <div class="widget-inner">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/">2021</a></li></ul>
    </div>
  </div>


    
</div>

<div id="backtop"><i class="icon icon-arrow-up"></i></div>
            </aside>
            
        </div>
    </div>

    <footer class="footer">
    <div class="footer-wave">
        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="#3c4859" fill-opacity="1" d="M0,160L60,181.3C120,203,240,245,360,240C480,235,600,181,720,186.7C840,192,960,256,1080,261.3C1200,267,1320,213,1380,186.7L1440,160L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z"></path></svg>
    </div>

    <div class="footer-wrap">
        <div class="footer-inner"> 
            Huhailong &copy; 2021<br>
            Powered By Hexo · Theme By <a href="https://github.com/lh1me/hexo-theme-aomori" target="_blank">Aomori </a>
            
            🧡 <span id="busuanzi_container_site_pv">本站总访问量<span id="busuanzi_value_site_pv"></span>次
</span><span id="busuanzi_container_site_uv">本站访客数<span id="busuanzi_value_site_uv"></span>人次</span>
            
        </div>
    </div>

</footer>


<script src="https://unpkg.com/gitalk/dist/gitalk.min.js"></script>





<script src="/dist/build.js?1630473019367.js"></script>


<script src="/dist/custom.js?1630473019367.js"></script>



<!-- 百度链接提交 -->
<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>




    <script src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>


<!-- Baidu Analytics-->
<script type="text/javascript">
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?c15cbbf786572a8cb10802fa47753bb5";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>



</body>

</html>